home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: in1.uu.net!world!mv!usenet
- From: ENGR@GSSI.MV.COM (Michael Furman)
- Subject: Re: What are the differences between structures and classes in C++ ?
- Message-ID: <DprL5v.H86@mv.mv.com>
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- Organization: GSSI
- Date: Fri, 12 Apr 1996 19:37:06 GMT
- References: <4k5m65$av@hpscit.sc.hp.com> <316A7639.3383@sto.fdata.se> <DpM37F.Dzp@mv.mv.com> <316B7554.AFE@sto.fdata.se>
- X-Newsreader: WinVN 0.99.7
- X-Nntp-Posting-Host: gssi.mv.com
-
- In article <316B7554.AFE@sto.fdata.se>, niklas.mellin@sto.fdata.se says...
- > [....]
- >
- >I did reread them and I can still not find any one but me coming up with a
- >complete and correct answer. Raghuveera Ravinutala asked about the
- >differences between structs and classes, and a correct answer is that
- >the default access of members AND BASE CLASSES is public in structs and
- >private in classes.
-
- Ok - I was wrong when I said that you did not read answers carefully: now
- I see you did. But you sill not correct (see below).
-
- >No other reply stated that also the base class access is public. And most
- >of them (including yours) even said that the ONLY difference is the default
- >access of the members, which is just wrong.
- >
- >There was one reply stating that in structs everything is public by
- >default and in classes everything is private by default, which is
- >technically correct, but not very enlightning.
-
- All what you said (except the last sentence) would be correct if the
- question
- was an exam or interview question. But it was not. Person who asked this
- question did not know a lot about C++. And he/she did not need formal and
- full answer. Mentioning base classes for somebody who does not know what
- class is - is not very enlightening.
-
-
- --
- <<< If you received it by E-mail: it is a copy of post to the newsgroup >>>
- ---------------------------------------------------------------
- Michael Furman, (603)893-1109
- Geophysical Survey Systems, Inc. fax:(603)889-3984
- 13 Klein Drive - P.O. Box 97 engr@gssi.mv.com
- North Salem, NH 03073-0097 71543.1334@compuserve.com
- ---------------------------------------------------------------
-
-